class Lecture < Event
  validates_uniqueness_of :ccn

  def alternative_lectures
    lectures = self.course.lectures
    return lectures.select{ |l| l != self}
  end

  def Lecture.find_by_ccn(ccn)
    return find(:first, :conditions => { :ccn => ccn })
  end

  def discussions
    self.course.discussions
  end

  def labs
    self.course.labs
  end

end
